<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>约健</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">

    {include file="public:headfile"}
</head>

<body class="hold-transition sidebar-mini">
<div class="wrapper">

    {include file="public:head"}

    {include file="public:slidemenu"}

    <div class="content-wrapper">

        <section class="content-header">
            <div class="container-fluid">
                <div class="row mb-2">
                    <div class="col-sm-6">
                        <h1>俱乐部管理</h1>
                    </div>
                </div>
            </div>
        </section>



        <!-- Main content -->
        <section class="content">
            <div class="row">
                <div class="col-12">
                    <div class="card">
                        <div class="card-header">
                            <h3 class="card-title"><button data-toggle="modal"
                                    data-target="#add">
                                        添加
                                     </button></h3>
                        </div>
                        <!-- /.card-header -->
                        <div class="card-body">
                            <table id="example2" class="table table-bordered table-hover">
                                <thead>
                                <tr>
                                    <th>编号</th>
                                    <th>俱乐部名字</th>
                                    <th>俱乐部简介</th>
                                    <th>电话号码</th>
                                    <th>图片</th>
                                    <th>地址</th>
                                    <th>开放时间</th>
                                    <th>经度</th>
                                    <th>纬度</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                {volist name="list" id="vo"}    
                                <tr>
                                    <td>{$i}</td>
                                    <td>{$vo.cname}</td>
                                    <td>{$vo.cintro}</td>
                                    <td>{$vo.ctel}</td>
                                    <td><img src="__STATIC__/img/clubimg/{$vo.cpic} " style="width: 90px;height:50px"></td>
                                    <td>{$vo.caddress}</td>
                                    <td>{$vo.copentime}</td>
                                    <td>{$vo.clatitude}</td>
                                    <td>{$vo.clongitude}</td>
                                    <td><button><a style="color: black" href="{:url('SuperAdmin/ClubsController/delete',['id'=>$vo.cid])}">删除</a></button></td>
                                </tr>
                                {/volist}
                                </tbody>
                            </table> 
                        </div>
                        <!-- /.card-body -->
                        <div class="dataTables_paginate paging_simple_numbers">{$list->render()}</div>
                    </div>
                    <!-- /.card -->
                </div>
                <!-- /.col -->
            </div>
            <!-- /.row -->
        </section>
        <!-- /.content -->

    </div>
</div>
<!-- /模态框 -->
 <div class="modal fade" id="add" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
         <h4 class="modal-title" id="myModalLabel">添加俱乐部</h4>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
       
      </div>
      <div class="modal-body">

  <form class="form-horizontal" action="{:url('SuperAdmin/ClubsController/add')}" method="post" enctype="multipart/form-data">

                    <div class="form-group">
                        <label for="name">管理员账号</label>
                        <input type="text" class="form-control" name="caccount" placeholder="管理员账号" id="caccount">
                    </div>

                    <div class="form-group">
                        <label for="name">管理员密码</label>
                        <input type="text" class="form-control" name="cpwd" placeholder="管理员密码" id="cpwd">
                    </div>

                    <div class="form-group">
                        <label for="name">俱乐部名称</label>
                        <input type="text" class="form-control" name="cname" placeholder="俱乐部名称" id="cname">
                    </div>

                    <div class="form-group">
                        <label for="name">俱乐部简介</label>
                        <input type="text" class="form-control" name="cintro" placeholder="俱乐部简介" id="cintro">
                    </div>

                     
                     <div class="form-group">
                        <label for="name">电话号码</label>
                        <input type="text" class="form-control" name="ctel" placeholder="电话号码" id="ctel">
                    </div>
                       <div class="form-group">
                        <label for="name">图片</label>
                        <input type="file" class="form-control" name="pic" placeholder="图片" id="pic">
                    </div>
                       <div class="form-group">
                        <label for="name">地址</label>
                        <input type="text" class="form-control" name="caddress" placeholder="地址" id="caddress">
                    </div>
                       <div class="form-group">
                        <label for="name">开放时间</label>
                        <input type="text" class="form-control" name="copentime" placeholder="开放时间" id="copentime">
                    </div>
                    
                       <div class="form-group">
                        <label for="name">经度</label>
                        <input type="text" class="form-control" name="clatitude" placeholder="经度" id="clatitude">
                    </div>
                     
                       <div class="form-group">
                        <label for="name">纬度</label>
                        <input type="text" class="form-control" name="clongitude" placeholder="纬度" id="clongitude">
                    </div>

  <div class="form-group">
    <div class="col-md-offset-2 col-md-10">
      
    

  </div>
</div>

    </div>
      <div class="modal-footer">
<input type="submit" name="" value="提交" class="btn btn-default">
      </form>
              <button type="button" class="btn btn-default" onclick="location.replace('index.html')" data-dismiss="modal">关闭</button>
      </div>
    </div>
  </div>
</div>  
<!-- /模态框结束 -->

{include file="public:footfile"}

</body>

</html>